package com.jt.www.enums.endorse;


import org.apache.commons.lang.StringUtils;

/**
 * 批单类型枚举
 *
 * @author
 * @date
 */


public enum EndorsementsTypeEnum {

    /**
     * 批单类型
     */
    //1、责任险批单类型
    ENDORS_TYPE_01("01", "一般性批改"),
    ENDORS_TYPE_02("02", "批减(删减人员)"),
    ENDORS_TYPE_03("03", "批加(新增人员)"),
    ENDORS_TYPE_04("04", "批退(全单退保)"),
    ENDORS_TYPE_05("05", "协议批加"),
    ENDORS_TYPE_06("06", "协议批减"),
    ENDORS_TYPE_07("07", "企业信息变更"),
    ENDORS_TYPE_08("08", "分社变更"),
    ENDORS_TYPE_09("09", "经营资格范围变更"),
    // 教育
    ENDORS_TYPE_10("10", "替换人员"),
    // TODO 临时注释-待开发
//    ENDORS_TYPE_11("11", "附加被保险人全加"),   临时注释-待开发
//    ENDORS_TYPE_12("12", "附加被保险人全减"),   临时注释-待开发
    ENDORS_TYPE_13("13", "新增附加派遣教师"),
    //    ENDORS_TYPE_14("14", "删减附加派遣教师"),   临时注释-待开发
    ENDORS_TYPE_15("15", "新增附加险"),
//    ENDORS_TYPE_16("16", "删减附加险"),
    ;


    private String type;

    private String desc;

    EndorsementsTypeEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static String getDescByType(String type) {
        if (StringUtils.isBlank(type)) {
            return "";
        }
        for (EndorsementsTypeEnum endorsementsTypeEnum : EndorsementsTypeEnum.values()) {
            if (endorsementsTypeEnum.type.equals(type)) {
                return endorsementsTypeEnum.desc;
            }
        }
        return "";
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
